<!DOCTYPE html>

<html lang="en" xmlns:th="http://www.thymeleaf.org">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
		<meta name="description" content="">
		<meta name="author" content="dcz">
		<!--定时20秒刷新-->
		<meta http-equiv=refresh content="20">

		<title>Dashboard Template for Bootstrap</title>
		<!-- Bootstrap core CSS -->
		<link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">

		<!-- Custom styles for this template -->
		<link th:href="@{/css/dashboard.css}" rel="stylesheet">

		<link th:href="@{/css/system.css}" rel="stylesheet">
		<style type="text/css">
			/* Chart.js */
			@-webkit-keyframes chartjs-render-animation {
				from {
					opacity: 0.99
				}
				to {
					opacity: 1
				}
			}

			@keyframes chartjs-render-animation {
				from {
					opacity: 0.99
				}
				to {
					opacity: 1
				}
			}
		</style>


	</head>

	<body>
		<!--顶部导航栏-->
		<div th:replace="~{commons/commons::topbar}"></div>

		<div class="container-fluid">
			<div class="row">

				<!--侧边栏-->
				<!--传递参数给组件-->
				<div th:replace="~{commons/commons::sidebar(active='system.html')}"></div>

				<main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
					<h1 class="text-center"><span class="label label-primary">激光雷达综合控制系统</span></h1>
					<div class="container">
						<div class="row clearfix">
							<div class="col-md-12 column">
								<div class="row clearfix">
									<div class="col-md-1 column">
										<button type="button" class="btn btn-default btn-primary">天气判别</button>
									</div>
									<div class="col-md-1 column" style="margin-left: 20px">
										<button type="button" class="btn btn-default btn-primary" >方舱天窗</button>
									</div>
									<div class="col-md-1 column" style="margin-left: 20px">
										<button type="button" class="btn btn-default btn-primary">PMT</button>
									</div>
									<div class="col-md-1 column" style="margin-left: 20px">
										<button type="button" class="btn btn-default btn-primary">激光器</button>
									</div>
									<div class="col-md-1 column" style="margin-left: 20px">
										<button type="button" class="btn btn-default btn-primary">数据采集</button>
									</div>
									<div class="col-md-1 column" style="margin-left: 20px">
										<button type="button" class="btn btn-default btn-primary">收发匹配</button>
									</div>

									<div class="col-md-1 column">

									</div>
									<div class="col-md-1 column">

									</div>
									<div class="col-md-1 column">
										<button type="button" class="btn btn-default btn-primary" name="button1">一键开机</button>
									</div>
									<div class="col-md-1 column">
										<button type="button" class="btn btn-default btn-primary" name="button1">一键关机</button>
									</div>
								</div>
								<div class="row clearfix">
									<div class="col-md-12 column">
										<div class="row clearfix" style="margin-top: 30px">
											<div class="col-md-3 column">
												<a 	class="list-group-item" >
													YAG激光器：<span th:text="${lidar.getYag_status()==0?'关闭':'开启'}"></span>
												</a>
												<a  class="list-group-item">
													激光波长：<span th:text="${lidar.getLaser_wavelength()}"></span>nm
												</a>
												<a  class="list-group-item">
													激光能量：<span th:text="${lidar.getLaser_energy()}"></span>mJ
												</a>
												<a  class="list-group-item">
													外循环水温：<span th:text="${lidar.getWater_temperature()}"></span>℃
												</a>
												<a  class="list-group-item">
													外循环水压：<span th:text="${lidar.getWater_pressure()}"></span>MPa
												</a>
												<a 	class="list-group-item">
													PDA激光器：<span th:text="${lidar.getPda_status()==0?'关闭':'开启'}"></span>
												</a>
												<a  class="list-group-item">
													方舱天窗：<span th:text="${lidar.getSunroof_status()==0?'关闭':'开启'}"></span>
												</a>
												<a  class="list-group-item">
													原子滤光器：<span th:text="${lidar.getYzlgq_status()==0?'关闭':'开启'}"></span>
												</a>
												<a  class="list-group-item">
													数据采集：<span th:text="${lidar.getData_collection_status()==0?'关闭':'开启'}"></span>
												</a>
												<a  class="list-group-item">
													光电倍增管：<span th:text="${lidar.getPmt_status()==0?'关闭':'开启'}"></span>
												</a>
												<a  class="list-group-item">
													望远镜：<span th:text="${lidar.getTelescope_status()==0?'关闭':'开启'}"></span>
												</a>
												<a  class="list-group-item">
													系统状态：<span th:text="${lidar.getSystem_status()==0?'关闭':'开启'}"></span>
												</a>
											</div>
											<div class="col-md-6 column">
												<img th:src="'data:image/png;base64,'+${weatherPictures}">
											</div>
											<div class="col-md-3 column">
												<img th:src="'data:image/png;base64,'+${echosignalPictures}">
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</main>
			</div>
		</div>
		<!-- Bootstrap core JavaScript
    ================================================== -->
		<!-- Placed at the end of the document so the pages load faster -->
		<script type="text/javascript" src="js/jquery-3.2.1.slim.min.js"></script>
		<script type="text/javascript" src="js/popper.min.js"></script>
		<script type="text/javascript" src="js/bootstrap.min.js"></script>

		<!-- Icons -->
		<script type="text/javascript" src="js/feather.min.js"></script>
		<script>
			feather.replace()
		</script>

		<!-- Graphs -->
		<script type="text/javascript" src="js/Chart.min.js"></script>
		<script>
			var ctx = document.getElementById("myChart");
			var myChart = new Chart(ctx, {
				type: 'line',
				data: {
					labels: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
					datasets: [{
						data: [15339, 21345, 18483, 24003, 23489, 24092, 12034],
						lineTension: 0,
						backgroundColor: 'transparent',
						borderColor: '#007bff',
						borderWidth: 4,
						pointBackgroundColor: '#007bff'
					}]
				},
				options: {
					scales: {
						yAxes: [{
							ticks: {
								beginAtZero: false
							}
						}]
					},
					legend: {
						display: false,
					}
				}
			});
			function a() {
				$("#logo").attr('src',"weather.png");

			}
		</script>


	</body>

</html>